import request from '@/utils/request'
// -------- 项目类型 --------

let BASE_ADDRESS = 'work/projectMaterial'

// 分页查询
export const getProjectMaterialListApi = (params) =>{
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}

// 编辑项目材料 /work/projectMaterial/edit
export const editProjectMaterialApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}

//添加项目材料  /work/projectMaterial/add
export const addProjectMaterialApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}

// 删除项目材料 /work/projectMaterial/remove/{id}
export const removeProjectMaterialApi = (id) =>{
    return request({
        url: `${BASE_ADDRESS}/remove/${id}`,
        method: 'delete',
    })
}

//删除项目材料样本  /work/materialSample/remove/{id}
export const removeMaterialSampleApi = (id) =>{
    return request({
        url: `/work/materialSample/remove/${id}`,
        method: 'delete',
    })
}

// 添加多个项目材料 /work/projectMaterial/addlist
export const addlistProjectMaterialApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/addlist`,
        method: "post",
        data
    })
}